#ifndef __BASIC_TAB_TO_SPACES__
#define __BASIC_TAB_TO_SPACES__

#include "substitute_all.h"
#include <string>


// use the substitute_all function to replace all the tabs with spaces
//   the substitution is "rigid": a tab is always substituted with the same number of spaces



inline std::string  tab2spaces( std::string input, int spaces=8 ){

  std::string largeSpace = "";
  for (int i=0; i< spaces; i++)
    largeSpace.append(" ");

  return substitute_all( input, "\t", largeSpace );
}



#endif  //   __BASIC_TAB_TO_SPACES__
